import request from '@/utils/request'
// 分页查询 state 0全部 1 设置 2未设置 childrenId 父id 查询 以及分页
export function getAgencyPersonRestrictPage(query) {
  return request({
    url: '/AgencyPersonRestrictController/queryAgencyPersonRestrict',
    method: 'get',
    params: query
  })
}
// 修改
export function updateAgencyPersonRestrict(data) {
  return request({
    url: '/AgencyPersonRestrictController/updateAgencyPersonRestrict',
    method: 'post',
    data
  })
}
// 新增
export function insertAgencyPersonRestrict(data) {
  return request({
    url: '/AgencyPersonRestrictController/saveAgencyPersonRestrict',
    method: 'post',
    data
  })
}

// 根据id删除
export function deleteAgencyPersonRestrict(data) {
  return request({
    url: '/AgencyPersonRestrictController/deleteAgencyPersonRestrict/{id}',
    method: 'post',
    data
  })
}
// 根据id 判断 新增或修改
export function insertUpdateAgencyPersonRestrict(data) {
  return request({
    url: '/AgencyPersonRestrictController/insertUpdateAgencyPersonRestrict',
    method: 'post',
    data
  })
}
// 根据agencyid 查这个单位下的所有人数以及状态
export function queryAgencyId(agencyId) {
  return request({
    url: '/AgencyPersonRestrictController/queryAgencyId',
    method: 'get',
    params: {
      agencyId
    }
  })
}
// 根据区划查找工资类型
export function agencyType(agencyId) {
  return request({
    url: '/AgencyPersonRestrictController/agencyType',
    method: 'get',
    params: {
      agencyId
    }
  })
}
// 根据机构id查询当前单位
export function currentUnit(query) {
  return request({
    url: '/AgencyPersonRestrictController/currentUnit',
    method: 'get',
    params: {
      query
    }
  })
}

